using System;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;

namespace Plox
{
    [RunInstaller(true)]
    public class PloxInstaller : Installer
    {
        private ServiceProcessInstaller serviceProcessInstaller;
        private ServiceInstaller serviceInstaller;

        public PloxInstaller()
        {
            serviceProcessInstaller = new ServiceProcessInstaller();
            serviceInstaller = new ServiceInstaller();
            serviceProcessInstaller.Account = ServiceAccount.LocalSystem;

            serviceInstaller.ServiceName = "Plox";
            serviceInstaller.DisplayName = "Plox";
            serviceInstaller.Description = "Plox deletes old files for you automatically. Plox to be die, old files!";
            serviceInstaller.StartType = ServiceStartMode.Automatic;

            this.Installers.AddRange(new Installer[] { serviceProcessInstaller, serviceInstaller });
        }
    }
}
